Configuring Transaction DB Connections
The purpose of a Transaction Management (TM) database is to store and track the many transactions made by RFgen client users. For example, if you have 20 users making changes at the same time on inventory where some of the inventory is being moved, some is being added to it and so forth, its important to keep track of the changes in an organized fashion.
This screen is used to setup connection to the TM database, and should be created before configuring the System Queues and Tasks (under the Connections menu.)
Configuring the connection to the TM database is similar to other database connection.
To use the default database provided by RFgen
a. Set the Database Type to SQLite.
b. Click on the Search icon in the SQLite Database box, and look for a RFgenTM.db under the C:\ProgramData\RFgen 5.2 folder.
c. Click on Test Connection. You should receive a message that says "Connection Successful."
Data Source Configuration Settings
Runtime Connectivity Checks and Require Manual Login - are enabled if checked.
Session Timeout (hr) - This value is in hours, and will disconnect and reconnect to the database at the specified interval. This may be required if the database is configured to not allow a connection that never times out.
Query Timeout (sec) - This specifies how many seconds the server should wait before giving up on the database driver to come back with a response.
Reset on Error (Hex) - This property that is unique. When turned on it will reset the data connection under the following conditions. This should not be used unless deemed necessary.
If you submit a SQL statement to the DB, and an error code is returned, RFgen will look for the code in the Reset on Error (hex) table.
- If the error code is found, RFgen will try to reset the data connector. (RFgen won’t resend the submitted query that produced the error code.)
- If RFgen cannot find the error code in the Reset on Error (hex) table, RFgen won’t reset the data connector.
To set the error code:
Example: The error log shows -21456327. Use the Windows calculator in Programmer mode, select Dec and Dword options, enter the number and if you need the negative sign use the ± button to change its sign. Then click the Hex option. You should get: FEB89A39. Enter this value into the box with a “0x” prefix like:  0xFEB89A39
Data Source Configuration
To configure the Mobile Development Studio to connect with your own application database, use a SQL-compliant database. When the server connects to a database, it will display a connection indicator at the bottom of the Mobile Development Studio window. If a red circle appears in the indicator, a valid connection has not been made. To troubleshoot an invalid database connection, click on the Mobile Development Studio Reports menu bar selection, then check your Event Logs to see if a message has been generated. Most likely, a problem was encountered with your Data Source entry.
The Source Id is the name of data connection. Spaces and extended characters are not recommended for this field.
The Database Type drop down field selects which type of database is to be used to host the solution objects. Changing this value changes the content of the Connection screen, to show database specific configuration fields.
Data Access Mode sets the cursor to either Static or Dynamic when retrieving data from the database. Usually, Static is best because it is fast and safe. However, if you have a database like Pervasive that will actually make a copy of the data from the database system to the RFgen system when using a static cursor, you can change this option to Dynamic, so performance will not suffer. Internally, this sets the cursor option to either adoOpenStatic or adoOpenDynamic.
If Require Manual Login is checked, this means the client will not be allowed to connect to the database unless the user on the client is authorized. For example, with JD Edwards, if Require Manual Login is checked, when the user logs in to process a transaction, his/her login user ID is checked against the Named User list; If the Named User list is not setup correctly in RFgen (or JD Edwards), or, if the user isn’t on the Name User list, a database error may result.
If Require Manual Login is unchecked, the client will be allowed to connect with the database automatically.